/*************************************************
filename	: system_gadget.h
author		: Stefan lulham
desc		: System gadget
*************************************************/
#ifndef D_SYSTEM_GADGET_H
#define D_SYSTEM_GADGET_H

#include "platform.h"
#include "system_enums.h"
#include <string>
#include <list>
#if defined (DELGE_PLATFORM_WIN32)
#include <Windows.h>
#include <modules\system\win32\win32_system_gadget.h>
#define InterfaceSystemGadget		Win32SystemGadget
#endif

using namespace std;

namespace DelGE
{
	namespace Modules
	{
		namespace System
		{
			class SystemGadget
			{
			protected:
				InterfaceSystemGadget* pInterface;

			public:
				SystemGadget();
				SystemGadget(InterfaceSystemGadget *pImplementation);
				~SystemGadget();

				void SetSize(int iWidth, int iHeight);
				void SetWidth(int iWidth);
				void SetHeight(int iHeight);
				int GetWidth();
				int GetHeight();
				void SetPosition(int iX, int iY);
				void SetPositionX(int iX);
				void SetPositionY(int iY);
				int GetPositionX();
				int GetPositionY();
				int GetClientPositionX();
				int GetClientPositionY();

				bool IsMouseInside();
				bool HasFocus();
				void SetFocus();

				int ScreenPositionXToClientPositionX(int iScreenPositionX);
				int ScreenPositionYToClientPositionY(int iScreenPositionY);

				int ClientPositionXToScreenPositionX(int iWindowPositionX);
				int ClientPositionYToScreenPositionY(int iWindowPositionY);

				InterfaceSystemGadget* GetInterfaceGadget() const;

				DelGESystemGadgetType GetGadgetType();
			};

			bool operator ==(const SystemGadget &pGadget0, const SystemGadget &pGadget1);
			bool operator !=(const SystemGadget &pGadget0, const SystemGadget &pGadget1);
		}
	}
}

#endif